<template>
	<div>
		<p>----------------------------------Outer-------------------------------------</p>
		{{getCount}}
		<hr>
		<button @click='add'>++操作</button>
		<br>
		<button @click='subtr'>--操作</button>
	</div>
</template>
<script>
	export default {
		name:'outer',
		data(){
			return {
			
			}
		},
		components: {
		
		},
		methods: {
			add:function(){
				this.$store.commit('increment');
			},
			subtr:function() {
				this.$store.commit('decrement');
			}
		},
		//计算
		computed: {
			getCount:function(argument) {
				return this.$store.state.count;
			}
		}
	}
</script>
<style scoped>
	
</style>